{% include "../../header.html" %}
{% include "../../navigation.html" %}

<div class="wrapper">
    <div class="container-fluid">

        <!-- Page-Title -->
        <div class="row">
            <div class="col-sm-12">
                <div class="page-title-box">
                    <div class="btn-group pull-right">
                        <h4 class="page-title">Add User</h4>
                    </div>
                    <ol class="breadcrumb hide-phone p-0 m-0">
                        <li class="breadcrumb-item"><a href="#">HuntCMS</a></li>
                        <li class="breadcrumb-item"><a href="#">User</a></li>
                        <li class="breadcrumb-item active">Add User</li>
                    </ol>
                </div>
            </div>
        </div>
        <!-- end page title end breadcrumb -->

        <div class="row">
            <div class="col-12">
                <div class="card-box">
                    <h4 class="m-t-0 header-title">Add User</h4>
                    <p class="text-muted m-b-30 font-14">
                        User can add admin user.
                    </p>


                    <div class="row">
                        <div class="col-12">
                            <div class="p-20">
                                <form class="form-horizontal" role="form" action="" method="post">
                                    <div class="form-group row">
                                        <label class="col-2 col-form-label">Email(Account)</label>
                                        <div class="col-10">
                                            <input type="email" name="email" class="form-control" required name="example-email" placeholder="Please enter your email">
                                        </div>
                                    </div>
                                    <div class="form-group row">
                                        <label class="col-2 col-form-label">Name</label>
                                        <div class="col-10">
                                            <input type="text" name="name" value="" class="form-control" required data-parsley-maxlength="12" placeholder="Please enter your nickname...">
                                        </div>
                                    </div>
                                    <!-- <div class="form-group row">
                                        <label class="col-2 col-form-label">Role</label>
                                        <div class="col-10">
                                            <div class="mt-3">
                                                {% for role in roles %}
                                                    <div class="custom-control custom-checkbox">
                                                        <input type="checkbox" name="roleid_{{role.id}}" class="custom-control-input" value="{{role.id}}" id="customCheck{{role.id}}">
                                                        <label onselectstart="return false" class="custom-control-label" for="customCheck{{role.id}}">{{role.name}}</label>
                                                    </div>
                                                {% endfor %}
                                            </div>
                                        </div>
                                    </div> -->
                                    <div class="form-group row">
                                        <label class="col-2 col-form-label">Role</label>
                                        <div class="col-10">
                                            <div class="mt-3">
                                                {% for role in roles %}
                                                    <div class="custom-control custom-checkbox">
                                                        <input type="checkbox" name="roleid" class="custom-control-input" value="{{role.id}}" id="customCheck{{role.id}}">
                                                        <label onselectstart="return false" class="custom-control-label" for="customCheck{{role.id}}">{{role.name}}</label>
                                                    </div>
                                                {% endfor %}
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group row">
                                        <label class="col-2 col-form-label">Language</label>
                                        <div class="col-10">
                                            <div class="mt-3">
                                                <select class="form-control" name="language">
                                                    <option value="">-- select language --</option>
                                                    {% for language in languages %}
                                                        <option value="{{ language.sign }}">{{ language.title }}</option>
                                                    {% endfor %}
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group row">
                                        <label class="col-2 col-form-label">Status</label>
                                        <div class="col-10">
                                            <div class="custom-control custom-radio">
                                                <input type="radio" id="customRadio1" value="1" name="status" class="custom-control-input">
                                                <label onselectstart="return false" class="custom-control-label" for="customRadio1">{{ trans("COMMON_SYSTEM_ENABLED") }}</label>
                                            </div>
                                            <div class="custom-control custom-radio">
                                                <input type="radio" checked id="customRadio2" value="0" name="status" class="custom-control-input">
                                                <label onselectstart="return false" class="custom-control-label" for="customRadio2">{{ trans("COMMON_SYSTEM_DISABLED") }}</label>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group mb-0 justify-content-end row">
                                        <div class="col-md-10">
                                            <button type="submit" class="btn btn-info waves-effect waves-light">Create</button>
                                        </div>
                                    </div>

                                </form>
                            </div>
                        </div>

                    </div>
                    <!-- end row -->

                </div> <!-- end card-box -->
            </div><!-- end col -->
        </div>
        <!-- end row -->

    </div> <!-- end container -->
</div>
<!-- end wrapper -->

{% include "../../footer.html" %}
<!-- Parsleyjs -->
<script type="text/javascript" src="/assets/vendor/parsleyjs/dist/parsley.min.js"></script>
<script>
    $(document).ready(function() {
        $('form').parsley();
    });
</script>